import { Asset, assetManager } from "cc";


export class ResourceLoad {
  loadRemote<T extends Asset>(url: string) {
    return new Promise<T>((resolve, reject) => {
      assetManager.loadRemote<T>(url, (err, asset) => {
        if (err) {
          reject(err);
        } else {
          resolve(asset);
        }
      })
    })
  }
}
